//
// Created by hjie on 23-8-13.
//
#pragma once
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include "rtp_frame.h"

class RtpParser
{
public:
    RtpParser();
    bool ParseRtpFrame(uint8_t * data, int length, int & use_length, RtpFrame & rtp_frame);
private:
    bool IsRtpPacket(uint8_t * data);
    bool ParseRtpHeaderFrame(uint8_t * data, int length, int & use_length, RtpHeaderFrame & header);
    bool ParesRtpDataFrame(uint8_t   * data, int length, int & use_length, RtpDataFrame   & rtp_data);
public:
};
